<?php

use think\migration\Migrator;
use think\migration\db\Column;

class PasswordResets extends Migrator
{

    public function change()
    {
        $table = $this->table('password_resets', ['id' => false]);
        $table->addColumn('email', 'string', ['limit' => 255, 'default' => ''])
            ->addColumn('token', 'string', ['limit' => 255, 'default' => ''])
            ->addColumn('created_at', 'timestamp', ['default' => null, 'null' => true])
            ->addIndex('email')
            ->create();
    }
}
